package com.mg.flightplan.utils;

import java.text.DecimalFormat;

public class DistanceConverter {


	private String dstStr=null;
	public DistanceConverter() {
	}
	public DistanceConverter(float route){
		convert(route);
	}
	
	private void convert(float route){
		DecimalFormat dec = new DecimalFormat("###.#");
		dstStr = dec.format(route)+"nm";
	}

	public String toString(float route){
		convert(route);
		return dstStr;
	}
	
	public String toString(){
		return dstStr;
	}

}
